<?php
require_once 'VersionControl/SVN.php';
    
// Setup error handling -- always a good idea!
$svnstack = &PEAR_ErrorStack::singleton('VersionControl_SVN');

// Set up runtime options. 
$options = array('fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_ARRAY);
// Request list class from factory
$svn = VersionControl_SVN::factory('list', $options);

// Define any switches and aguments we may need
$switches = array('username' => 'vinhphu3000', 'password' => '0lc38294');
$args = array('https://ushop.springloops.com/source/ushop');

// Run command
if ($output = $svn->run($args, $switches)) {
    print_r($output);
} else {
    if (count($errs = $svnstack->getErrors())) { 
        foreach ($errs as $err) {
            echo '<br />'.$err['message']."<br />\n";
            echo "Command used: " . $err['params']['cmd'];
        }
    }
}